﻿<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - @WebApp.Classes.Statics.GetApplicationName()</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />

@using WebApp.Classes

        @Styles.Render("~/bootstrap/css/bootstrap.min.css", "~/bootstrap/css/bootstrap-responsive.min.css")        
        @Scripts.Render("~/bundles/modernizr")

        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bootstrap/js/bootstrap.min.js")
        @Scripts.Render("~/bootstrap/js/bootstrap-dropdown.js")
        @Scripts.Render("~/bootstrap/js/bootstrap-modal.js")

        @Scripts.Render("~/Scripts/jquery.blockUI.js");

        @Scripts.Render("~/scripts/app/" + Path.GetFileNameWithoutExtension(Server.MapPath(VirtualPath)) + ".js")


        <script>
            var Routes = {
                Dashboard: "/WebApi/Report/GetUserStoreStatistics",
                DashboardCSV: "/WebApi/Report/GetUserStoreStatisticsCSV",

                StoreManagement: '@HttpContext.Current.Request.ApplicationPath' + '/Store/StoreManagement/',
                AddStore: '@HttpContext.Current.Request.ApplicationPath' + '/Store/AddStore/',
                ActivateStore: '@HttpContext.Current.Request.ApplicationPath' + '/Store/Activate/',
                RevokeStore: '@HttpContext.Current.Request.ApplicationPath' + '/Store/Revoke/',

                DomainManagement: '@HttpContext.Current.Request.ApplicationPath' + '/Domain/DomainManagement/',
                ActivateDomain: '@HttpContext.Current.Request.ApplicationPath' + '/Domain/Activate/',
                RevokeDomain: '@HttpContext.Current.Request.ApplicationPath' + '/Domain/Revoke/',
                
                BillingSettings: '@HttpContext.Current.Request.ApplicationPath' + '/Billing/BillingSettings/',
                ActivateBilling: '@HttpContext.Current.Request.ApplicationPath' + '/Billing/Activate/',
                RevokeBilling: '@HttpContext.Current.Request.ApplicationPath' + '/Billing/Revoke/',
                CouponSettings: '@HttpContext.Current.Request.ApplicationPath' + '/Coupon/CouponSettings/',

                CouponSettings: '@HttpContext.Current.Request.ApplicationPath' + '/Coupon/CouponSettings/',
                ActivateCoupon: '@HttpContext.Current.Request.ApplicationPath' + '/Coupon/Activate/',
                RevokeCoupon: '@HttpContext.Current.Request.ApplicationPath' + '/Coupon/Revoke/',

                UserManagement: '@HttpContext.Current.Request.ApplicationPath' + '/Account/UserManagement/',
                ActivateAccount: '@HttpContext.Current.Request.ApplicationPath' + '/Account/Activate/',
                RevokeAccount: '@HttpContext.Current.Request.ApplicationPath' + '/Account/Revoke/',

                Invoices: '@HttpContext.Current.Request.ApplicationPath' + '/Invoice/Invoices/',
                InvoiceDetails: '@HttpContext.Current.Request.ApplicationPath' + '/Invoice/InvoiceDetails/',
                ChargeDetails: '@HttpContext.Current.Request.ApplicationPath' + '/Invoice/ChargeDetails/',
                BillInvoice: '@HttpContext.Current.Request.ApplicationPath' + '/Invoice/CreateInvoices/',
                VoidInvoice: '@HttpContext.Current.Request.ApplicationPath' + '/Invoice/VoidInvoice/',
                InvoicePDF: "/WebApi/Report/InvoicePDF",
                InvoiceDetailsCSV: "/WebApi/Report/InvoiceDetailsCSV",

                InitCache: "/WebApi/Cache/InitCache"
            };
        </script>

        <style>
            .validation-summary-errors {
                background-color: #F2DEDE;
                border-color: #EED3D7;
                border-radius: 4px 4px 4px 4px;
                color: #B94A48;
                margin-bottom: 18px;
                padding: 8px 35px 8px 14px;
                text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);                
            }
            
            .nav li.dropdown ul.dropdown-menu li:HOVER ul 
            {
                display:block;
                position:absolute;
                left:100%;
                -webkit-border-radius: 3px;
                -moz-border-radius: 3px;
                border-radius: 3px;
            }
            .nav li.dropdown ul.dropdown-menu ul 
            {
                display: none;
                float:right;
                position: relative;
                top: auto;
                margin-top: -30px;
            }   
                        
            #facebook{
	            margin-top:30px;
	            margin-left: auto;
                margin-right: auto
            }
            .facebook_block{
	            background-color:#9FC0FF;
	            border:2px solid #3B5998;
	            float:left;
	            height:30px;
	            margin-left:5px;
	            width:8px;
                opacity:0.1;
	            -webkit-transform:scale(0.7);
	            -webkit-animation-name: facebook;
 	            -webkit-animation-duration: 1s;
 	            -webkit-animation-iteration-count: infinite;
 	            -webkit-animation-direction: linear;

	            }
            #block_1{
 	            -webkit-animation-delay: .3s;
             }
            #block_2{
 	            -webkit-animation-delay: .4s;
            }
            #block_3{
 	            -webkit-animation-delay: .5s;
            }
            @@-webkit-keyframes facebook{
	            0%{-webkit-transform: scale(1.2);opacity:1;}
	            100%{-webkit-transform: scale(0.7);opacity:0.1;}
            }
                     
        </style>

    </head>
    <body>

        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">

                <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>

                <!-- Be sure to leave the brand out there if you want it shown -->
                <a class="brand" href="#">@WebApp.Classes.Statics.GetApplicationName()</a>
           
                @if (this.Context.User.Identity.IsAuthenticated)
                {                    
                    <ul class="nav">

                    @{                                                
                    var menu = new WebApp.Classes.MenuCookie().Get().Menu;
                    var user = new WebApp.Classes.UserCookie().Get().User;

                    if (menu != null)
                    {
                        foreach (var item in menu.Where(o => o.ParentID.Equals(0)))
                        {
                            var subMenu = menu.Where(o => o.ParentID.Equals(item.AppID));

                            <li class="divider-vertical"></li>
                                
                            @Html.GetMenu(menu, item, subMenu)              
                        }
                    }                        
                    }
                    </ul>  
                    
                    <ul class="nav pull-right">
                        <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><img src="~/Images/glyphicons/png/glyphicons_003_user_white.png" width="15px" /> Welcome, @String.Format("{0} {1}!", user.FirstName, user.LastName)<b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="~/Account/ChangePassword"><img src="~/Images/glyphicons/png/glyphicons_240_rotation_lock.png" width="15px" /> Change Password</a></li>  
                                <li><a href="~/Account/UserProfile"><img src="~/Images/glyphicons/png/glyphicons_003_user.png" width="15px" /> User Profile</a></li>  
                                <li class="divider"></li>  
                                <li><a href="~/Account/LogOff"><img src="~/Images/glyphicons/png/glyphicons_063_power.png" width="15px" /> Log Out</a></li>  
                            </ul>                        
                        </li>
                    </ul>
                }

              <!-- Everything you want hidden at 940px or less, place within here -->
              <div class="nav-collapse">
                <!-- .nav, .navbar-search, .navbar-form, etc -->
              </div>

            </div>
          </div>
        </div>

        <br />
        <br />
        <br />

        <div class="container">        
            <!--Body content-->
            @RenderBody()          

            <hr/><h5>Copyright © @DateTime.Now.Year PopUpJoe</h5>
        </div>

        @RenderSection("scripts", required: false)

        <div class='modal hide' id='alertSuccess'>
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h3><img src="~/Images/glyphicons/png/glyphicons_193_circle_ok.png" /> Success!</h3>
            </div>
            <div class="modal-body" id="successMessage">
                
            </div>
        </div>

        <div class='modal hide' id='alertWarning'>
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h3><img src="~/Images/glyphicons/png/glyphicons_196_circle_exclamation_mark.png" /> Warning!</h3>
            </div>
            <div class="modal-body" id="warningMessage">
                
            </div>
        </div>

    </body>
</html>
